package de.hmm.hwip.storage.service;

import de.hmm.hwip.general.IMessageContent;
import de.hmm.hwip.storage.api.ISQLite;

/**
 *  Implementation of the SQLite storage service.
 * 	Class starts a new thread to get/set data in a data source
 * 
 * @author Johannes Mendel
 * @version 11.10.2012
 *
 */
public class SQLiteStorageImpl implements ISQLite {

	/**
	 * Function for getting data from data source or upadate/insert
	 * new data to the source
	 * 
	 * @param msg - Message Content with all needed parameter
	 */
	@Override
	public void transferData(IMessageContent msg) {
		
		// generating a new thread 
		SQLiteStorageThread sst = new SQLiteStorageThread();
		
		// set needed data - which are provide via the messagehandler unit
		sst.setContentData(msg);
		
		// start thread
		new Thread(sst).start();
	}

}
